package fr.cdesire.sudoku.applet.bean;

import java.io.Serializable;

public class BoutonBean implements Serializable {
	
	/**
	 * Serial ID
	 */
	private static final long serialVersionUID = 2980714846276194704L;

	private String libelle;
	
	private boolean visible;

	public String getLibelle() {
		return libelle;
	}

	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}

	public boolean isVisible() {
		return visible;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((libelle == null) ? 0 : libelle.hashCode());
		result = prime * result + (visible ? 1231 : 1237);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BoutonBean other = (BoutonBean) obj;
		if (libelle == null) {
			if (other.libelle != null)
				return false;
		} else if (!libelle.equals(other.libelle))
			return false;
		if (visible != other.visible)
			return false;
		return true;
	}
}
